Hi David,
Not sure what you
mean by "Joystick"? Do you mean Gamepad?
Not sure
what you mean by Temporarily?
I can't think of
an easy way to do that from KFLOP C Code.
Jogging
is all handled by KMotionCNC in the Tool Setup :
Trajectory Planner Parameters running on the PC.
A
related variable on the PC is: m_JogSlowPercent but new
KFLOP to PC Commands would be needed to set it in the PC
and make use of it.
Jog
Speeds gets embedded in all the buttons when they are
created so if changed the screen needs to be re-created
with:
DestroyWindow();
Create(IDD_KMOTIONCNC_0_ORIGINAL+m_DialogFace);
// put up the real main window
You
might read the documents created by Troy here:
Specifically the:
Adding Jog
Percent Cell to Main Dialog Face.pdf
Regards
TK
| Group: DynoMotion |
Message: 12324 |
From: Tom Kerekes |
Date: 9/26/2015 |
| Subject: Re: Jog Speed System Variable |
Hi David,
Temporarily changing the KMotionCNC Trajectory Planner Setting doesn't seem like a good idea because if they somehow don't get set back (by an unexpected program exit) then they can get modified in a confusing manner. So it seems like a temporary Jog Speed Override is a better idea. That avoids reading/saving/restoring the settings. To cancel the override set the factor back to 1.0 which is the reset value when KMotionCNC starts up.
Here is a patch to add the new Jog Override to KMotionCNC.exe. You will also need to copy in the PC-DSP.h file that has the new command codes definitions for KFLOP to send.
Here is an example showing KFLOP setting the override factors for X and Y
#include "KMotionDef.h"
#define TMP 10 // which spare persist to use to transfer data #include "KflopToKMotionCNCFunctions.c"
main() { DoPCFloat(PC_COMM_SET_JOG_OVERRIDE_X, 0.25); DoPCFloat(PC_COMM_SET_JOG_OVERRIDE_Y, 0.50); }
HTH Regards TK
From: "David Stevenson david.m.stevenson@... [DynoMotion]" <DynoMotion@yahoogroups.com> To: DynoMotion@yahoogroups.com Sent: Saturday, September 26, 2015 4:43 PM Subject: Re: [DynoMotion] Jog Speed System Variable
Hi Tom,
The Trajectory Planner screen in KMCNC has boxes where we set the
jog speed settings for the various axis. The box is labeled
Joystick/Jog. For most aspects of my usage those setting are great.
I have an application where I would like to reduce that number while
something is done, because the gamepad motion is too fast and then I
was hoping to reset that variable back to the original figure in the
KMCNC trajectory planner window. So my dream is to read that number
into a variable to store it, reduce it for the c program's purpose
and then set it back to the original value before the c program
terminates.
Hope this makes sense,
David.
On 9/26/2015 7:03 PM, Tom Kerekes
tk@... [DynoMotion] wrote:
Hi David,
Not sure what you
mean by "Joystick"? Do you mean Gamepad?
Not sure
what you mean by Temporarily?
I can't think of
an easy way to do that from KFLOP C Code.
Jogging
is all handled by KMotionCNC in the Tool Setup :
Trajectory Planner Parameters running on the PC.
A
related variable on the PC is: m_JogSlowPercent but new
KFLOP to PC Commands would be needed to set it in the PC
and make use of it.
Jog
Speeds gets embedded in all the buttons when they are
created so if changed the screen needs to be re-created
with:
DestroyWindow();
Create(IDD_KMOTIONCNC_0_ORIGINAL+m_DialogFace);
// put up the real main window
You
might read the documents created by Troy here:
Specifically the:
Adding Jog
Percent Cell to Main Dialog Face.pdf
Regards
TK
| Group: DynoMotion |
Message: 12326 |
From: David Stevenson |
Date: 9/27/2015 |
| Subject: Re: Jog Speed System Variable |
Hi Tom,
That worked beautifully! Thank you very much for your help with
this!
Best regards,
David.
On 9/27/2015 1:16 AM, Tom Kerekes
tk@... [DynoMotion] wrote:
Hi David,
Temporarily
changing the KMotionCNC Trajectory Planner Setting
doesn't seem like a good idea because if they somehow
don't get set back (by an unexpected program exit)
then they can get modified in a confusing manner. So
it seems like a temporary Jog Speed Override is a
better idea. That avoids reading/saving/restoring the
settings. To cancel the override set the factor back
to 1.0 which is the reset value when KMotionCNC starts
up.
Here
is a patch to add the new Jog Override to
KMotionCNC.exe. You will also need to copy in the
PC-DSP.h file that has the new command codes definitions
for KFLOP to send.
Here is an
example showing KFLOP setting the override factors for X
and Y
#include
"KMotionDef.h"
#define TMP 10 // which spare persist to use to transfer
data
#include "KflopToKMotionCNCFunctions.c"
main()
{
DoPCFloat(PC_COMM_SET_JOG_OVERRIDE_X, 0.25);
DoPCFloat(PC_COMM_SET_JOG_OVERRIDE_Y, 0.50);
}
HTH
Regards
TK
Hi Tom,
The Trajectory Planner screen in KMCNC
has boxes where we set the jog speed
settings for the various axis. The box
is labeled Joystick/Jog. For most
aspects of my usage those setting are
great. I have an application where I
would like to reduce that number while
something is done, because the gamepad
motion is too fast and then I was hoping
to reset that variable back to the
original figure in the KMCNC trajectory
planner window. So my dream is to read
that number into a variable to store it,
reduce it for the c program's purpose
and then set it back to the original
value before the c program terminates.
Hope this makes sense,
David.
On
9/26/2015 7:03 PM, Tom Kerekes tk@...
[DynoMotion] wrote:
Hi
David,
Not sure what you mean
by "Joystick"? Do you mean
Gamepad?
Not
sure what you mean by
Temporarily?
I
can't think of an easy way to do
that from KFLOP C Code.
Jogging
is all handled by KMotionCNC in
the Tool Setup : Trajectory
Planner Parameters running on
the PC.
A
related variable on the PC is:
m_JogSlowPercent but new KFLOP
to PC Commands would be needed
to set it in the PC and make use
of it.
Jog
Speeds gets embedded in all the
buttons when they are created so
if changed the screen needs to
be re-created with:
DestroyWindow();
Create(IDD_KMOTIONCNC_0_ORIGINAL+m_DialogFace);
// put up the real main window
You
might read the documents created
by Troy here:
Specifically the:
Adding Jog Percent
Cell to Main Dialog Face.pdf
Regards
TK
| | | |